﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Company.master" AutoEventWireup="true"
    CodeFile="Company_Favorite.aspx.cs" Inherits="Company_Favorite" %>

<%@ Import Namespace="Avatar.Model" %>
<%@ Import Namespace="Avatar.Common" %>
<%@ Import Namespace="Avatar.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph_Main" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="Dialog">
        <div class="Title">
            简历收藏夹</div>
        <div class="Content">
            <asp:GridView ID="gv_ResumeList" runat="server" AutoGenerateColumns="False" GridLines="None"
                CellPadding="4" ForeColor="#333333" EmptyDataText="您目前没有收藏任何简历" 
                Width="100%">
                <RowStyle BackColor="#EFF3FB" />
                <Columns>
                    <asp:TemplateField HeaderText="姓名">
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" Text='<%#((Resume)Eval("Resume")).PersonalBasicInfo.Name%>' />
                            <asp:HiddenField ID="lbl_ResumeID" runat="server" Value='<%# Eval("ResumeID")%>' />
                            <asp:HiddenField ID="lbl_JobID" runat="server" Value='<%# Eval("JobID")%>' />
                            <asp:HiddenField ID="lbl_FavoriteRecordID" runat="server" Value='<%# Eval("ID")%>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="最高学历">
                        <ItemTemplate>
                            <%#((Resume)Eval("Resume")).PersonalBasicInfo.Diploma.Name %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="所在城市">
                        <ItemTemplate>
                            <%# ((Resume)Eval("Resume")).PersonalBasicInfo.Area.Name %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="工作经验">
                        <ItemTemplate>
                            <%# ((Resume)Eval("Resume")).PersonalBasicInfo.WorkingAge.Age %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="应聘职位">
                        <ItemTemplate>
                            <a href='job.aspx?ID=<%# Eval("JobID") %>' target="_blank">
                                <%# ((Job)Eval("job")).Title %>
                            </a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="期望年薪">
                        <ItemTemplate>
                            <%# ((Resume)Eval("Resume")).PersonalBasicInfo.SalaryYear.Salary%>￥/年
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="面试通知">
                        <ItemTemplate>
                            <div style="text-align: center;">
                                <%# InterView(Eval("ResumeID").ToString(),new Guid(Eval("jobID").ToString())) %></div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="收藏时间">
                        <ItemTemplate>
                            <%# Helper.DateTimeStringFormat(Convert.ToDateTime(Eval("Date").ToString())) %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <div style="text-align: center;">
                                <div id="Div1" visible="<%# _serviceID==1?true:false %>" runat="server">
                                    [<a href="#" onclick="{if(confirm('普通企业服务用户 不能查看求职简历')){return true;}return false;}">查看</a>]</div>
                               <div id="Div2" visible="<%# _serviceID==2?true:false %>" runat="server"> [<a href="./resumeview.aspx?user=<%# Eval("ResumeID") %>" target="_blank" onclick="<%# JobConfigManager.GetJobConfig()!=null?"{if(confirm('查看此条信息需付费"+JobConfigManager.GetJobConfig().Price.ToString()+"元')){return true;}return false;}":"alert('系统设置错误，请与客服联系。')" %>">查看</a>]</div>
                                <div id="Div3" visible="<%# _serviceID==3?true:false %>" runat="server">[<a href='ResumeView.aspx?User=<%#Eval("ResumeID") %>' target="_blank">查看</a>]</div>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <EmptyDataTemplate>
                    <table>
                        <tr>
                            <td class="th">
                                姓名
                            </td>
                            <td class="th">
                                最高学历
                            </td>
                            <td class="th">
                                所在城市
                            </td>
                            <td class="th">
                                工作经验
                            </td>
                            <td class="th">
                                应聘职位
                            </td>
                            <td class="th">
                                期望年薪
                            </td>
                            <td class="th">
                                面试通知
                            </td>
                            <td class="th">
                                收藏时间
                            </td>
                            <td class="th">
                                操作
                            </td>
                        </tr>
                        <tr>
                            <td colspan="9" style="padding-top: 5%; padding-bottom: 5%; text-align: center">
                                没有收藏
                            </td>
                        </tr>
                    </table>
                </EmptyDataTemplate>
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle HorizontalAlign="Left" BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#2461BF" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
            <table style="width: 100%" id="panel_op" runat="server">
                <tr>
                    <td style="text-align: left;">
                        <asp:CheckBox ID="cb_all" AutoPostBack="true" Text="全选" runat="server" OnCheckedChanged="cb_all_CheckedChanged" />
                    </td>
                    <td style="text-align: right;">
                        <asp:Button ID="btn_Interview" runat="server" Text="通知面试" CssClass="Button" OnClick="btn_Interview_Click" />&nbsp;<asp:Button
                            ID="btn_DeleteRecord" runat="server" Text="取消收藏" CssClass="Button" OnClick="btn_DeleteRecord_Click" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div class="Dialog" id="panel_Content" runat="server" visible="true">
        <div class="Title">
            面试通知内容</div>
        <div class="Content">
            面试地点：<asp:TextBox ID="txt_Address" runat="server" Width="250px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ControlToValidate="txt_Address" ErrorMessage="*"></asp:RequiredFieldValidator>
            <br />
            通知内容：<asp:TextBox ID="txt_Content" runat="server" Rows="5" TextMode="MultiLine" 
                Width="300px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                ControlToValidate="txt_Content" ErrorMessage="*"></asp:RequiredFieldValidator>
            <br />
            <asp:Button ID="btn_Ok" runat="server" Text="通知" CssClass="Button" 
                onclick="btn_Ok_Click" />
        </div>
    </div>
            <asp:Label ID="lbl_Error" runat="server" ForeColor="Red" EnableViewState="false"></asp:Label>
</asp:Content>
